<?php
$this->breadcrumbs = array(
	'Quản lý Sự kiện' => array('/Events/default/index'),
    'Cập nhật SEO Tag sự kiện'
);
?>
<!-- BEGIN PORTLET-->
<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'event-form',
	'enableClientValidation'=>false,
	'clientOptions'=>array(
		'validateOnSubmit'=>false,
	),
	'htmlOptions'=>array(
		'class'=>''
	),
)); ?>
<div class="form-body">
    <div class="row">
        <div class="col-md-6">
            <!-- BEGIN Portlet Events-->
            <div class="portlet box blue">
                <div class="portlet-title">
                    <div class="caption"><i class="icon-reorder"></i>Thông tin sự kiện</div>
                    <div class="tools">
                        <a href="javascript:;" class="collapse"></a>
                    </div>
                </div>
                <div class="portlet-body">
                    <div class="form-group">
                        <?php echo $form->labelEx($model, 'title', array('class'=>'control-label')); ?>
                        <?php echo $form->textField($model, 'title', array('class'=>'form-control input-sm', 'placeholder'=>'Điền tên sự kiện của bạn', 'disabled'=>'disabled')); ?>
                        <span class="help-block text-danger"><?php echo $form->error($model, 'title'); ?></span>
                    </div>
                    <div class="form-group">
                        <?php echo $form->labelEx($model, 'brief', array('class'=>'control-label')); ?>
                        <?php echo $form->textArea($model, 'brief', array('class'=>'form-control input-sm', 'placeholder'=>'Mô tả nội dung sự kiện của bạn', 'rows'=>5, 'disabled'=>'disabled')); ?>
                        <span class="help-block text-danger"><?php echo $form->error($model, 'brief'); ?></span>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <!-- BEGIN Portlet SeoTool-->
            <div class="portlet box red">
                <div class="portlet-title">
                    <div class="caption"><i class="icon-reorder"></i>Thông tin SEO</div>
                    <div class="tools">
                        <a href="javascript:;" class="collapse"></a>
                    </div>
                    <div class="actions">
                        <a id="add-seo" href="javascript:;" class="btn blue btn-sm"><i class="icon-pencil"></i> Copy</a>
                    </div>
                </div>
                <div class="portlet-body">
                    <div class="form-group">
                        <?php echo $form->labelEx($model->seotool, 'title', array('class'=>'control-label')); ?>
                        <?php echo $form->textField($model->seotool, 'title', array('class'=>'form-control input-sm', 'placeholder'=>'')); ?>
                        <span class="help-block text-danger"><?php echo $form->error($model->seotool, 'title'); ?></span>
                    </div>

                    <div class="form-group">
                        <?php echo $form->labelEx($model->seotool, 'description', array('class'=>'control-label')); ?>
                        <?php echo $form->textArea($model->seotool, 'description', array('class'=>'form-control input-sm', 'placeholder'=>'', 'rows'=>5)); ?>
                        <span class="help-block text-danger"><?php echo $form->error($model->seotool, 'description'); ?></span>
                    </div>
                </div>
            </div>
            <!-- END Portlet PORTLET-->
        </div>
    </div>

    <div class="row">
        <div class="portlet box">
            <div class="portlet-body form">
                <div class="form-actions fluid">
                    <div class="text-right">
                        <button type="submit" class="btn blue" onclick="Custom.showLoading();"><i class="icon-ok"></i> Cập nhật</button>
                        <a href="<?php echo Yii::app()->createUrl('/Events/default/index'); ?>" class="btn default">Cancel</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<?php $this->endWidget(); ?>
<script type="text/javascript">
$(document).ready(function(e) {
    $('#add-seo').on('click', function(){
        $('#SeoTools_title').val($('#Events_title').val());
        $('#SeoTools_description').val($('#Events_brief').val());
    });
});

</script>